<?php 

defined('_JEXEC') or die('Restricted access');
$doc = JFactory::getDocument();
$style = '.boxrjet{ width: '.$thumb_width.'px; height: '.$thumb_height.'px;}';
$style .= ' .boxcaption{ height: '.$box_text.'px; }';
$style .= ' .boxcaption1{ top: '.$thumb_height.'px;}';
$style .= ' .boxcaption5{ top: '.($thumb_height-$line_height).'px;}';
$doc->addStyleDeclaration($style);	
?>


<script type="text/javascript">
if(typeof(JU<?php echo $module->id;?>)=='undefined') JU<?php echo $module->id;?> = jQuery.noConflict();

JU<?php echo $module->id;?>(document).ready(function($){

<?php if($slect_theme == 1){ ?>		
$('.boxrjet').hover(function(){
$(".cover<?php echo $slect_theme.'-'.$module->id; ?>", this).stop().animate({top:'<?php echo ($thumb_height - $box_text).'px'; ?>'},{queue:false,duration:300});
}, function() {
$(".cover<?php echo $slect_theme.'-'.$module->id; ?>", this).stop().animate({top:'<?php echo $thumb_height.'px'; ?>'},{queue:false,duration:300});
});
<?php } else if($slect_theme == 2) { ?>		
$('.boxrjet').hover(function(){
$(".cover<?php echo $slect_theme.'-'.$module->id; ?>", this).stop().animate({top:'<?php echo $thumb_height.'px'; ?>', left:'<?php echo $thumb_width.'px'; ?>'},{queue:false,duration:300});
}, function() {
$(".cover<?php echo $slect_theme.'-'.$module->id; ?>", this).stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
});
<?php } else if($slect_theme == 3) { ?>

$('.boxrjet').hover(function(){
$(".cover<?php echo $slect_theme.'-'.$module->id; ?>", this).stop().animate({left:'<?php echo $thumb_width.'px'; ?>'},{queue:false,duration:300});
}, function() {
$(".cover<?php echo $slect_theme.'-'.$module->id; ?>", this).stop().animate({left:'0px'},{queue:false,duration:300});
});

<?php } else if($slect_theme == 4) { ?>

$('.boxrjet').hover(function(){
$(".cover<?php echo $slect_theme.'-'.$module->id; ?>", this).stop().animate({top:'<?php echo $box_text;?>px'},{queue:false,duration:160});
}, function() {
$(".cover<?php echo $slect_theme.'-'.$module->id; ?>", this).stop().animate({top:'0px'},{queue:false,duration:160});
});
<?php } else if($slect_theme == 5) { ?>

$('.boxrjet').hover(function(){
$(".cover<?php echo $slect_theme.'-'.$module->id; ?>", this).stop().animate({top:'<?php echo ($thumb_height - $box_text).'px'; ?>'},{queue:false,duration:160});
}, function() {
$(".cover<?php echo $slect_theme.'-'.$module->id; ?>", this).stop().animate({top:'<?php echo ($thumb_height - $line_height).'px'; ?>'},{queue:false,duration:160});
});
<?php } ?>
});
</script>

<?php
if (sizeof($items) > 0){
if((	$slect_theme == 1) || (	$slect_theme == 5)){
foreach ($items as $item) :?>
<div class="boxrjet captionfull boxrjet<?php echo $slect_theme; ?>">
<img title="<?php echo $item['title']?>" alt="<?php echo $item['title']?>" class="attachment-Mini Square" src="<?php echo $item['thumb']?>"/>
<div class="cover<?php echo $slect_theme.'-'.$module->id; ?> boxcaption boxcaption<?php echo $slect_theme?>">
<h3 class="title-emer"><a title="<?php echo $item['title']?>" href="<?php echo $item['link']?>"><?php echo $item['sub_title']?></a></h3>
<p><?php echo $item['sub_content']?></p>
</div>		
</div>
<?php endforeach; ?>
<?php
}else{

foreach ($items as $item) :?>
<div class="boxrjet captionfull boxrjet<?php echo $slect_theme; ?> ">
<img class="cover<?php echo $slect_theme.'-'.$module->id; ?> title="<?php echo $item['title']?>" alt="<?php echo $item['title']?>" class="attachment-Mini Square" src="<?php echo $item['thumb']?>">
<div class="boxcaption boxcaption<?php echo $slect_theme?>">
<h3 class="title-emer"><a title="<?php echo $item['title']?>" href="<?php echo $item['link']?>"><?php echo $item['sub_title']?></a></h3>
<p><?php echo $item['sub_content']?></p>
</div>		
</div>
<?php endforeach; ?> 
<?php
}
}  
?>